package com.ng.common.controller;

import com.ng.common.constants.SecurityConstants;

import jakarta.servlet.http.HttpServletRequest;

public class Controller {
	protected String getUserId(HttpServletRequest request) {
		return request.getAttribute(SecurityConstants.CUR_USER_ID)!=null?request.getAttribute(SecurityConstants.CUR_USER_ID).toString():"";
	}
	
	protected String getUserDeptId(HttpServletRequest request) {
		return request.getAttribute(SecurityConstants.CUR_USER_DEPT_ID)!=null?request.getAttribute(SecurityConstants.CUR_USER_DEPT_ID).toString():"";
	}
	
	protected String getUserName(HttpServletRequest request) {
		return request.getAttribute(SecurityConstants.CUR_USER_DEPT_ID)!=null?request.getAttribute(SecurityConstants.CUR_USER_DEPT_ID).toString():"";
	}
}
